Optimal. Leaf size=240 \[ \frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\left (c d^2-b d e+a e^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 240, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {1660, 12, 738,
212} \begin {gather*} \frac {2 \left (-x \left (c (2 a g (2 e f-d g)-b f (2 d g+e f))+b g^2 (b d-a e)+2 c^2 d f^2\right )-b \left (a g (d g+2 e f)+c d f^2\right )+2 a \left (a e g^2-c f (e f-2 d g)\right )+b^2 e f^2\right )}{\left (b^2-4 a c\right ) \sqrt {a+b x+c x^2} \left (a e^2-b d e+c d^2\right )}+\frac {(e f-d g)^2 \tanh ^{-1}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{\left (a e^2-b d e+c d^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 738
Rule 1660
Rubi steps
\begin {align*} \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx &=\frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int -\frac {\left (b^2-4 a c\right ) (e f-d g)^2}{2 \left (c d^2-b d e+a e^2\right ) (d+e x) \sqrt {a+b x+c x^2}} \, dx}{b^2-4 a c}\\ &=\frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{c d^2-b d e+a e^2}\\ &=\frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {\left (2 (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{c d^2-b d e+a e^2}\\ &=\frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\left (c d^2-b d e+a e^2\right )^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.20, size = 244, normalized size = 1.02 \begin {gather*} 2 \left (\frac {-2 a^2 e g^2+2 c^2 d f^2 x-2 a c d g (2 f+g x)+2 a c e f (f+2 g x)+a b g (2 e f+d g-e g x)+b^2 \left (-e f^2+d g^2 x\right )+b c f (-e f x+d (f-2 g x))}{\left (b^2-4 a c\right ) \left (-c d^2+e (b d-a e)\right ) \sqrt {a+x (b+c x)}}+\frac {\sqrt {-c d^2+b d e-a e^2} (e f-d g)^2 \tan ^{-1}\left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )}{\left (c d^2+e (-b d+a e)\right )^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(554\) vs.
\(2(230)=460\).
time = 0.13, size = 555, normalized size = 2.31
method | result | size |
default | \(-\frac {g \left (-e g \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )+\frac {2 d g \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {4 e f \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )}{e^{2}}+\frac {\left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) \left (\frac {e^{2}}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}-\frac {\left (e b -2 c d \right ) e \left (2 c \left (x +\frac {d}{e}\right )+\frac {e b -2 c d}{e}\right )}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \left (\frac {4 c \left (a \,e^{2}-b d e +c \,d^{2}\right )}{e^{2}}-\frac {\left (e b -2 c d \right )^{2}}{e^{2}}\right ) \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}-\frac {e^{2} \ln \left (\frac {\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{3}}\) | \(555\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 994 vs.
\(2 (239) = 478\).
time = 12.23, size = 2032, normalized size = 8.47 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (f + g x\right )^{2}}{\left (d + e x\right ) \left (a + b x + c x^{2}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 757 vs.
\(2 (239) = 478\).
time = 6.14, size = 757, normalized size = 3.15 \begin {gather*} -\frac {2 \, {\left (\frac {{\left (2 \, c^{3} d^{3} f^{2} - 2 \, b c^{2} d^{3} f g + b^{2} c d^{3} g^{2} - 2 \, a c^{2} d^{3} g^{2} - 3 \, b c^{2} d^{2} f^{2} e + 2 \, b^{2} c d^{2} f g e + 4 \, a c^{2} d^{2} f g e - b^{3} d^{2} g^{2} e + a b c d^{2} g^{2} e + b^{2} c d f^{2} e^{2} + 2 \, a c^{2} d f^{2} e^{2} - 6 \, a b c d f g e^{2} + 2 \, a b^{2} d g^{2} e^{2} - 2 \, a^{2} c d g^{2} e^{2} - a b c f^{2} e^{3} + 4 \, a^{2} c f g e^{3} - a^{2} b g^{2} e^{3}\right )} x}{b^{2} c^{2} d^{4} - 4 \, a c^{3} d^{4} - 2 \, b^{3} c d^{3} e + 8 \, a b c^{2} d^{3} e + b^{4} d^{2} e^{2} - 2 \, a b^{2} c d^{2} e^{2} - 8 \, a^{2} c^{2} d^{2} e^{2} - 2 \, a b^{3} d e^{3} + 8 \, a^{2} b c d e^{3} + a^{2} b^{2} e^{4} - 4 \, a^{3} c e^{4}} + \frac {b c^{2} d^{3} f^{2} - 4 \, a c^{2} d^{3} f g + a b c d^{3} g^{2} - 2 \, b^{2} c d^{2} f^{2} e + 2 \, a c^{2} d^{2} f^{2} e + 6 \, a b c d^{2} f g e - a b^{2} d^{2} g^{2} e - 2 \, a^{2} c d^{2} g^{2} e + b^{3} d f^{2} e^{2} - a b c d f^{2} e^{2} - 2 \, a b^{2} d f g e^{2} - 4 \, a^{2} c d f g e^{2} + 3 \, a^{2} b d g^{2} e^{2} - a b^{2} f^{2} e^{3} + 2 \, a^{2} c f^{2} e^{3} + 2 \, a^{2} b f g e^{3} - 2 \, a^{3} g^{2} e^{3}}{b^{2} c^{2} d^{4} - 4 \, a c^{3} d^{4} - 2 \, b^{3} c d^{3} e + 8 \, a b c^{2} d^{3} e + b^{4} d^{2} e^{2} - 2 \, a b^{2} c d^{2} e^{2} - 8 \, a^{2} c^{2} d^{2} e^{2} - 2 \, a b^{3} d e^{3} + 8 \, a^{2} b c d e^{3} + a^{2} b^{2} e^{4} - 4 \, a^{3} c e^{4}}\right )}}{\sqrt {c x^{2} + b x + a}} + \frac {2 \, {\left (d^{2} g^{2} - 2 \, d f g e + f^{2} e^{2}\right )} \arctan \left (-\frac {{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} e + \sqrt {c} d}{\sqrt {-c d^{2} + b d e - a e^{2}}}\right )}{{\left (c d^{2} - b d e + a e^{2}\right )} \sqrt {-c d^{2} + b d e - a e^{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (f+g\,x\right )}^2}{\left (d+e\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________